home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Text / WASTE / WASTE 1.1.2 Distribution / Pseudo-UPI for THINK Pascal / Resources.p < prev    next >
Encoding:
Text File  |  1995-10-12  |  1.1 KB  |  54 lines  |  [TEXT/PJMM]

  1. unit Resources;
  2.  
  3. { Pascal Interface to the Macintosh Libraries }
  4.  
  5. { Copyright © Apple Computer Inc. }
  6. { All Rights Reserved }
  7.  
  8. { Adapted for use with THINK Pascal 4.0.x by Marco Piovanelli }
  9.  
  10. interface
  11.     uses
  12.         Types;
  13.  
  14.     type
  15.  
  16. {        ResErrProcPtr uses register based parameters on the 68k and cannot}
  17. {        be written in or called from a high-level language without the help of}
  18. {        mixed mode or assembly glue.}
  19.  
  20. {        In:}
  21. {         => thErr           D0.W}
  22.  
  23.         ResErrProcPtr = ProcPtr;  { PROCEDURE ResErr(thErr: OSErr); }
  24.         ResErrUPP = UniversalProcPtr;
  25.  
  26.     const
  27.         uppResErrProcInfo = $00001002; { Register PROCEDURE (2 bytes in D0); }
  28.  
  29.     function NewResErrProc (userRoutine: ResErrProcPtr): ResErrUPP;
  30.     inline
  31.         $2E9F;
  32.  
  33.     procedure CallResErrProc (thErr: OSErr;
  34.                                     userRoutine: ResErrUPP);
  35.     {To be implemented:  Glue to move parameters into registers.}
  36.  
  37.     function GetResourceSizeOnDisk (theResource: Handle): LONGINT;
  38.     inline
  39.         $A9A5;
  40.  
  41.     function GetMaxResourceSize (theResource: Handle): LONGINT;
  42.     inline
  43.         $A821;
  44.  
  45.     procedure RemoveResource (theResource: Handle);
  46.     inline
  47.         $A9AD;
  48.  
  49.     function GetNextFOND (fondHandle: Handle): Handle;
  50.     inline
  51.         $700A, $A822;
  52.  
  53. implementation
  54. end.